package com.enation.app.javashop.core.client.fallback.member;

import com.enation.app.javashop.core.client.feignimpl.member.MemberZpzzClientImpl;
import com.enation.app.javashop.core.handler.BaseFallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.enation.app.javashop.model.member.dos.MemberZpzzDO;
import org.springframework.stereotype.Component;

/**
 * 会员发票相关熔断fallback factory
 * @author kingapex
 * @version 1.0
 * @data 2022/5/28 14:26
 **/
@Component
public class MemberZpzzFallbackFactory extends BaseFallbackFactory< MemberZpzzClientImpl> {
    @Override
    protected MemberZpzzClientImpl fallback() {
        return new MemberZpzzFallback();
    }

    /**
     * 会员发票相关熔断
     *
     * @author zh
     * @version v7.0
     * @date 18/9/27 下午4:12
     * @since v7.0
     */
    @Component
    public static class MemberZpzzFallback implements MemberZpzzClientImpl {

        private final Logger logger = LoggerFactory.getLogger(getClass());


        @Override
        public MemberZpzzDO get() {
            logger.error("查询会员增票资质信息失败");
            return null;
        }


    }
}
